<?php

namespace app\common\model;

use think\Model;
use think\Request;

/**
 * @property int $id
 * @property string $area_code
 * @property string $area_id
 * @property string $area_name
 * @property string $center
 * @property string $city_code
 * @property string $create_time
 * @property string $level
 * @property string $parent_id
 * @property string $update_time
 */
class Region extends BaseModel
{
    // 表名
    protected $table = 'region';
    protected $pk = 'id';
    const primaryKey = 'id';

    // 追加属性
    protected $append = [

    ];

    public static function __make(Request $request)
    {
        return (new self())->find($request->param(self::primaryKey));
    }
}
